import axios from '@/common/plugins/Axios'

export default {
    // 查询数字员工列表，可分页查询
    queryUserByMul: (digUserName: String, digUserId: String, size: number, page: number) => {
            return axios.request({
                url: `/userManage/getDigUser`,
                method: 'get',
                params: {
                    digUserName: digUserName,
                    digUserId: digUserId,
                    size: size,
                    page: page
                }
            })
        },

    // 数字员工详情查询
    queryUserDetail: (digId: String) => {
        return axios.request({
            url: `/userManage/getDigUserDetail`,
            method: 'get',
            params: {
                digId: digId
            }
        })
    },
    // 数字员工注册
    registerUser: (user) => {
        return axios.request({
            url: `/userManage/registerUser`,
            method: 'put',
            data: user
        })
    },
    // 数字员工更改
    updateUser: (user) => {
        return axios.request({
            url: `/userManage/updateUser`,
            method: 'post',
            data: user
        })
    },
    // 数字员工注销
    deleteUser: (digId: String) => {
        return axios.request({
            url: `/userManage/deleteUser`,
            method: 'post',
            data: {digId: digId}
        })
    },
    // 根据真实员工工号查询姓名，电话
    queryStaffInfo: (staffAccount: String) => {
        return axios.request({
            url: `/userManage/getDigUserById`,
            method: 'get',
            params: { staffAccount }
        })
    },
    // 获取部门下拉框
    getOrgList: (orgName:String) => {
        return axios.request({
            url: `/busiCommon/getOrgList`,
            method: 'get',
            params: {
                orgName: orgName
            }
        })
    },
}
